import requests
import json
# 来自主数据复星项目之前
HOSPITALSOID_URL="http://172.16.7.24:10010/api/v1/base_mdm/saas/hospital/query/all"
# 来自吴勇
HOSPITALSOID_URL='http://139.224.45.52/mdm-base/api/v1/base_mdm/saas/hospital/query/all'
# 来自毛万奎
HOSPITALSOID_URL='http://172.16.5.63:10100/api/v1/base_mdm/saas/hospital/query/all'
# 复星QA
# HOSPITALSOID_URL='http://winning-mds-base:8080/api/v1/base_mdm/saas/hospital/query/all'

data = {}

def request_url(url, data):
	headers = {'Content-Type':'application/json;charset=utf8'}
	reponse = requests.post(url, data=json.dumps(data), headers=headers)
	if reponse.status_code == 200:
		reponse = json.loads(reponse.text)
		return reponse['data']
	else:
		return -1

hospitalsoid_all = request_url(HOSPITALSOID_URL, data)
print(hospitalsoid_all)
